home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr53 / pctv4n_1.zip / DBDESCNW.C < prev    next >
Text File  |  1993-06-10  |  839b  |  38 lines

  1. /**************************************************
  2. * FUNCTION NAME: dbDescribe for NETWARE XQL/SQL
  3. *
  4. * SYNOPSIS:     
  5. *       access .ddf to retrieve list of fields
  6. *                       via XQLDescribe
  7. ***************************************************/
  8.  
  9. int dbDescribe(int ColumnPos, 
  10.            struct ColumnDesc *col, 
  11.            REQUEST rq)
  12. {
  13. int       XQLStatus;
  14.  
  15.     col->namelen = NAMELENGTH;
  16.     col->data_type = 0;
  17.     col->size = 0; 
  18.     col->dec_places = 0;
  19.     col->display_len = 0; 
  20.     strcpy(col->fldname,"   ");
  21.  
  22.     XQLStatus = XQLDescribe (rq->CursorID, 
  23.             ColumnPos + 1, 
  24.             &col->data_type,
  25.             &col->size, 
  26.             &col->dec_places,
  27.             &col->display_len, 
  28.             &col->namelen,
  29.             col->fldname);
  30.  
  31.     if (XQLStatus)
  32.         return XQLStatus;
  33.     else
  34.         return SQL_SUCCESS;
  35.     
  36. }
  37.  
  38.